
<template>
  <div>
    <van-nav-bar class="header">
      <van-image class="img" fit="contain" :src="require('./assets/imgs/logo.png')" slot="left"/>
      <van-icon name="more" size="25" slot="right" />
    </van-nav-bar>
    <van-image fit="contain" :src="require('./assets/imgs/banner.jpg')"/>
    <van-grid clickable :column-num="2" :gutter="10" square :border="false">
      <van-grid-item v-for="(item,index) in items" :key="index"  
        :text="item.title" :to="item.to">
        <van-image class="item-img" :src="require('./assets/imgs/'+item.img)"/>
        <label>{{item.title}}</label>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
  import { Toast } from 'vant';

  export default {
    name: "freestay",
    data() {
      return {
        items: [
            {to:'/applys',title:'查看申请',icon:'comment-o',img:'icon_apply.png'},
            {to:'/hotels',title:'查找房源',icon:'location-o',img:'icon_room.png'},
            {to:'/admin',title:'医护人员入口',icon:'wap-home-o',img:'icon_doctor.png'},
            {to:'/hotel_admin',title:'酒店人员入口',icon:'todo-list-o',img:'icon_hottle.png'},
        ]
      }
    },
    mounted() {
    },
    created () {
      this.$store.dispatch('common/login','','')
    },
    methods: {
    }
  }
</script>

<style >
.header {
  padding-top: 10px;
  background-color: rgb(61, 61, 211);
}
.img {
  width: 130px;
  height: 30px;
}
.item-img {
  width: 45px;
  height: 50px;
}
</style>
  